package com.iseastar.guojiang.model;

import java.io.Serializable;

import droid.frame.utils.lang.ObjectSerialize;

/**
 * 业务员信息
 */
public class UserBean implements Serializable {

    private static final long serialVersionUID = -6744809002569052950L;
    //
    private Integer id; // 裹将id或者驿站id
    private Integer stationId;
    private String imagePath;// 头像
    private String name;//真实姓名
    private String nickName;//火箭侠昵称
    private String phone;
    private int status; // 店小三中等于 5暂停营业，等于2 正常营业

    private String alias;// jpush别名

    // 当前的角色 默认是裹将-0
    private int type;
    // ********** 以下是驿站中的字段
    private String code;// 驿站编号
    private String qrCodeUrl;// 二维码url
    private String serviceTime; // 服务时间
    private int isJam;
    private int isNeedUpdate;// 0-不需要更新，1-需要更新，2-需要强制更新

    private String password;
    //驿站级别
    private int level = 0;// 1-10 初级  11-20 标准 21-30 专业
    //驿站头像
    private String headImage;

    private Token token;

    private int state;//火箭侠登录相关状态码

    private CourierAudit courierAudit;

    /**
     * {@link UserStatus}
     *
     * @param status
     */
    public void setStatus(int status) {
        this.status = status;
        ObjectSerialize.write(this, null);
    }

    ////
    public String getQrCodeUrl() {
        return qrCodeUrl;
    }

    public void setQrCodeUrl(String qrCodeUrl) {
        this.qrCodeUrl = qrCodeUrl;
    }

    public int getIsNeedUpdate() {
        return isNeedUpdate;
    }

    public void setIsNeedUpdate(int isNeedUpdate) {
        this.isNeedUpdate = isNeedUpdate;
    }

    /**
     * 返回是否是裹将
     *
     * @return
     */
    public boolean isYiZhan() {
        return isJam == 0;
    }

    public int getIsJam() {
        return isJam;
    }

    public void setIsJam(int isJam) {
        this.isJam = isJam;
    }

    //
    public String getImagePath() {
        return imagePath;
    }

    public Integer getId() {
        return id;//id
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getStationId() {
        if (null == stationId || 0 >= stationId) {
            return null;
        } else {
            return stationId;
        }
    }

    public void setStationId(Integer stationId) {
        this.stationId = stationId;
    }

    public void setImagePath(String imagePath) {
        this.imagePath = imagePath;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public int getStatus() {
        return status;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getServiceTime() {
        return serviceTime;
    }

    public void setServiceTime(String serviceTime) {
        this.serviceTime = serviceTime;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public String getHeadImage() {
        return headImage;
    }

    public void setHeadImage(String headImage) {
        this.headImage = headImage;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public Token getToken() {
        return token;
    }

    public void setToken(Token token) {
        this.token = token;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public CourierAudit getCourierAudit() {
        return courierAudit;
    }

    public void setCourierAudit(CourierAudit courierAudit) {
        this.courierAudit = courierAudit;
    }

    public static class Token implements Serializable {

        private String phone;
        private String token;

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public String getToken() {
            return token;
        }

        public void setToken(String token) {
            this.token = token;
        }
    }

    /**
     * 火箭侠注册审核相关对象
     */
    public static class CourierAudit implements Serializable {

        private String addresss;
        private int auditStatus;//0 未提交  1 待审核  2 审核通过  3 审核失败
        private String auditTime;
        private String auditUserId;
        private String cityId;
        private int courierId;
        private int depositStatus;//1 未支付  2 已支付  3 退还
        private int id;//1
        private String idCardBackImg;//手持身份证照
        private String idCardFaceImg;//正面照
        private String idCardNo;
        private double latitude;
        private double longitude;
        private String name;//身份证的姓名
        private String nation;//民族
        private String phone;
        private int receiveStatus;// 1 未发放  2 已发放  3 已回收
        private String receiveTime;
        private String receiveUserId;
        private int sex;// 1 男  2 女
        private String wareHouseName;
        private String trainAddress;//培训地址
        private int trainStatus;// 1 未预约  2 预约成功  3 培训成功
        private String trainTime;
        private String trainUserId;

        public String getAddresss() {
            return addresss;
        }

        public void setAddresss(String addresss) {
            this.addresss = addresss;
        }

        public int getAuditStatus() {
            return auditStatus;
        }

        public void setAuditStatus(int auditStatus) {
            this.auditStatus = auditStatus;
        }

        public String getAuditTime() {
            return auditTime;
        }

        public void setAuditTime(String auditTime) {
            this.auditTime = auditTime;
        }

        public String getAuditUserId() {
            return auditUserId;
        }

        public void setAuditUserId(String auditUserId) {
            this.auditUserId = auditUserId;
        }

        public String getCityId() {
            return cityId;
        }

        public void setCityId(String cityId) {
            this.cityId = cityId;
        }

        public int getCourierId() {
            return courierId;
        }

        public void setCourierId(int courierId) {
            this.courierId = courierId;
        }

        public int getDepositStatus() {
            return depositStatus;
        }

        public void setDepositStatus(int depositStatus) {
            this.depositStatus = depositStatus;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getIdCardBackImg() {
            return idCardBackImg;
        }

        public void setIdCardBackImg(String idCardBackImg) {
            this.idCardBackImg = idCardBackImg;
        }

        public String getIdCardFaceImg() {
            return idCardFaceImg;
        }

        public void setIdCardFaceImg(String idCardFaceImg) {
            this.idCardFaceImg = idCardFaceImg;
        }

        public String getIdCardNo() {
            return idCardNo;
        }

        public void setIdCardNo(String idCardNo) {
            this.idCardNo = idCardNo;
        }

        public double getLatitude() {
            return latitude;
        }

        public void setLatitude(double latitude) {
            this.latitude = latitude;
        }

        public double getLongitude() {
            return longitude;
        }

        public void setLongitude(double longitude) {
            this.longitude = longitude;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getNation() {
            return nation;
        }

        public void setNation(String nation) {
            this.nation = nation;
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public int getReceiveStatus() {
            return receiveStatus;
        }

        public void setReceiveStatus(int receiveStatus) {
            this.receiveStatus = receiveStatus;
        }

        public String getReceiveTime() {
            return receiveTime;
        }

        public void setReceiveTime(String receiveTime) {
            this.receiveTime = receiveTime;
        }

        public String getReceiveUserId() {
            return receiveUserId;
        }

        public void setReceiveUserId(String receiveUserId) {
            this.receiveUserId = receiveUserId;
        }

        public int getSex() {
            return sex;
        }

        public void setSex(int sex) {
            this.sex = sex;
        }

        public String getWareHouseName() {
            return wareHouseName;
        }

        public void setWareHouseName(String wareHouseName) {
            this.wareHouseName = wareHouseName;
        }

        public String getTrainAddress() {
            return trainAddress;
        }

        public void setTrainAddress(String trainAddress) {
            this.trainAddress = trainAddress;
        }

        public int getTrainStatus() {
            return trainStatus;
        }

        public void setTrainStatus(int trainStatus) {
            this.trainStatus = trainStatus;
        }

        public String getTrainTime() {
            return trainTime;
        }

        public void setTrainTime(String trainTime) {
            this.trainTime = trainTime;
        }

        public String getTrainUserId() {
            return trainUserId;
        }

        public void setTrainUserId(String trainUserId) {
            this.trainUserId = trainUserId;
        }
    }
}